#include <iostream>
#include "GeeJoan/IoTModule.pb.h"
using namespace GeeJoan::Protocol;
int main()
{
    IoT::CreateDeviceRequest createDeviceRequest;
    IoT::CreateDeviceRequest tcreateDeviceRequest;

    uint64_t  gid ;

    std::cin >>gid;
    createDeviceRequest.set_gatewayid(gid);

    std::string out ;
    createDeviceRequest.SerializePartialToString(&out);

    uint64_t tgid ;

    tcreateDeviceRequest.ParseFromString(createDeviceRequest.SerializeAsString());

    tgid = tcreateDeviceRequest.gatewayid();
    std::cout <<" tgid "<< tgid <<std::endl;

    return 0;
}